#!/bin/bash
# Author: fanyongfeng
# 0  1 * * * /bin/bash /root/script/zentao_data_backup.sh &>> /backup/zentao_data_backup/backup.log

TODAY=$(date +%Y%m%d)
BACKUP_DIR="/backup/zentao_data_backup"
TMP_BACKUP_DIR="/data/zentao/backups"

mv -rp ${TMP_BACKUP_DIR}/${TODAY}* ${BACKUP_DIR}/ 

find ${BACKUP_DIR} -mtime +7 -name "202*" | xargs -r -n 10 rm -rf